<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'sub_query.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <script type="text/javascript">
  	function queryPhone(phone){
  	  	var span1 = document.getElementById("span1");
  		if(phone.length < 11){
  			span1.innerHTML = "<font color='red'>手机号输入格式错误，不能小于11位</font>";
  		}
  		if(phone.length > 11){
  			span1.innerHTML = "<font color='red'>手机号输入格式错误，不能大于11位</font>";
  		}
  		if(phone.length == 11){
  		span1.innerHTML = "<font color='red'></font>";
  		}
  	}
  	
  	function queryId(Idumber){
  	  	var span2 = document.getElementById("span2");
  		if(Idumber.length < 18){
  			span2.innerHTML = "<font color='red'>证件号码格式输入错误，不能小于18位</font>";
  		}
  		if(Idumber.length > 18){
  			span2.innerHTML = "<font color='red'>证件号码格式输入错误，不能大于18位</font>";
  		}
  		if(Idumber.length == 18){
  		span2.innerHTML = "<font color='red'></font>";
  		}
  	}
  </script>
  <body>
    <div style="padding:10px;background:#fafafa;">
    <div>积分消费</div>
    <hr color="red">
    <form action="crm/subs/queryByPhoneAndId" method="post">
    <div align="center">请输入手机号码：
    <input type="text" name="mobile" onblur="queryPhone(this.value);">
    <font style="color: red">*13000000000</font>&nbsp;
    <span id="span1"></span>
    </div>
    <br>
     <div align="center">请输入证件号码：
    <input type="text" name="Idumber" onblur="queryId(this.value);"><font style="color: red">*440883190000000000</font>&nbsp;
    <span id="span2"></span>
    <br><br>
     <input type="submit" value="确定">
    </div>
    </form>
    </div>
  </body>
</html>
